{config_load file="index.conf"}
{include file="inc/doctype.tpl"}

<head>
    <title>Private chat</title>
    {include file="inc/include.tpl"}
    <meta http-equiv="refresh" content="{#refresh#}" />
</head>

<body>

{include file="inc/logo.tpl"}
{include file="inc/global_menu.tpl"}

<div>Chat with <a href="/another/profile/{$data.user_id}/">{$data.user_login}</a></div><br />

<div>
{if sizeof($messages)}
	{foreach from=$messages item=item}
	    [{$item.tetatet_created|date_format:"%H:%M:%S"}] {if $item.tetatet_user_id_from == $data.user_id}<a href="/another/profile/{$data.user_id}/"><b>{$data.user_login}</b></a>{else}<b>You</b>{/if}: {$item.tetatet_message|escape}<br />
	{/foreach}
	<div>
    <!-- Paging -->
    {foreach from=$paging item=item key=key}
        {if $page == $key}{$item}{else}<a href="{$sys_action_path}/{$data.user_id}/{if $key != 0}{$key}/{/if}">{$item}</a>{/if} 
    {/foreach}
    <!--// Paging -->
</div>
{else}
    <p>Empty</p>
{/if}
</div><br />

<img src="/media/img/design/13.gif" />
<a href="/another/write/{$data.user_id}/">Write message</a><br />
<img src="/media/img/design/15.gif" />
<a href="{$sys_action_path}/{$data.user_id}/">Refresh</a><br />
<img src="/media/img/design/point.gif" />
<a href="/another/index/{$data.user_id}/">User menu</a>

</body>

</html>